;*******************************************************************************
; (C) 2006 Keith S. Robertson - IE_BIF.INC
;-------------------------------------------------------------------------------
;
; BIF Format Files Include
;
;*******************************************************************************

;-------------------------------------------------------------------------------
; Constants
;-------------------------------------------------------------------------------

BIF_ACCESS_FILE		equ 0
BIF_ACCESS_MEMORY	equ 1

;-------------------------------------------------------------------------------
; Structures
;-------------------------------------------------------------------------------

BIFF_HEADER				STRUCT
	Signature			DD	?
	Version				DD	?
	FileEntries			DD	?
	TileEntries			DD	?
	FileEntriesOffset	DD	?
BIFF_HEADER				ENDS

BIF__HEADER				STRUCT
	Signature			DD	?
	Version				DD	?
	LengthFilename		DD	?
BIF__HEADER				ENDS

BIFC_HEADER				STRUCT
	Signature			DD	?
	Version				DD	?
	UncompressedBIFSize	DD	?

BIFC_HEADER				ENDS

BIFF_FILE_ENTRY_RECORD	STRUCT
	ResLocator			DD		?
    ResOffset			DD		?
    ResSize				DD		?
    ResType				DD		?
BIFF_FILE_ENTRY_RECORD	ENDS


BIFF_TILE_ENTRY_RECORD	STRUCT
	ResLocator			DD		?
    ResOffset			DD		?
    ResNoTiles			DD		?
    ResSize				DD		?
    ResType				DD		?
BIFF_TILE_ENTRY_RECORD	ENDS



;-------------------------------------------------------------------------------
; Prototypes
;-------------------------------------------------------------------------------
BIFOpenFile				PROTO	:DWORD
BIFCloseFile			PROTO	:DWORD

BIFReadHeader			PROTO	:DWORD, :DWORD
BIFReadBody				PROTO	:DWORD, :DWORD
BIFReadAll				PROTO	:DWORD, :DWORD

BIFIsCompressed			PROTO	:DWORD, :DWORD
BIFUncompress			PROTO	:DWORD, :DWORD
BIFUncompressedSize		PROTO	:DWORD, :DWORD, :DWORD
BIFCompressedSize		PROTO	:DWORD, :DWORD, :DWORD
BIFCompressedName		PROTO	:DWORD, :DWORD, :DWORD
BIFCompressedType		PROTO	:DWORD, :DWORD, :DWORD
BIFCompressedData		PROTO	:DWORD, :DWORD, :DWORD

BIFNoFileEntries		PROTO	:DWORD, :DWORD, :DWORD
BIFNoTileEntries		PROTO	:DWORD, :DWORD, :DWORD


BIFFileEntriesOffset 	PROTO	:DWORD, :DWORD, :DWORD
BIFFileEntryResLocator 	PROTO	:DWORD, :DWORD, :DWORD, :DWORD
BIFFileEntryResOffset 	PROTO	:DWORD, :DWORD, :DWORD, :DWORD
BIFFileEntryResSize 	PROTO	:DWORD, :DWORD, :DWORD, :DWORD
BIFFileEntryResType 	PROTO	:DWORD, :DWORD, :DWORD, :DWORD
BIFFileEntry			PROTO	:DWORD, :DWORD, :DWORD, :DWORD


BIFTileEntriesOffset 	PROTO	:DWORD, :DWORD, :DWORD
BIFTileEntryResLocator 	PROTO	:DWORD, :DWORD, :DWORD, :DWORD
BIFTileEntryResOffset 	PROTO	:DWORD, :DWORD, :DWORD, :DWORD
BIFTileEntryResNoTiles 	PROTO	:DWORD, :DWORD, :DWORD, :DWORD
BIFTileEntryResSize 	PROTO	:DWORD, :DWORD, :DWORD, :DWORD
BIFTileEntryResType 	PROTO	:DWORD, :DWORD, :DWORD, :DWORD
BIFTileEntry			PROTO	:DWORD, :DWORD, :DWORD, :DWORD


